-- GENERATED SPELL FOR [Death Talon Dragonspawn] --


function spell0_12422(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15284,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12422', 620, 1)
end

function spell1_12422(pUnit, Event) --@Dragonbane,n/a--
pUnit:FullCastSpellOnTarget(23967,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12422', 536, 1)
end

function spell2_12422(pUnit, Event) --@Strike,n/a--
pUnit:FullCastSpellOnTarget(15580,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_12422', 682, 1)
end

function Sorts_12422(pUnit, Event)
local choix_sorts_12422 = math.random(0, 2)
if choix_sorts_12422 == 0 then
pUnit:RegisterEvent('spell0_12422', 1, 1)
end
if choix_sorts_12422 == 1 then
pUnit:RegisterEvent('spell1_12422', 1, 1)
end
if choix_sorts_12422 == 2 then
pUnit:RegisterEvent('spell2_12422', 1, 1)
end
end

function mob12422_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_12422', math.random(1500, 3000), 1)
end

function mob12422_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12422_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob12422_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(12422, 1, 'mob12422_Action')
RegisterUnitEvent(12422, 2, 'mob12422_Leave')
RegisterUnitEvent(12422, 3, 'mob12422_Kill')
RegisterUnitEvent(12422, 4, 'mob12422_Die')
